Method and apparatus for managing power of a storage system

ABSTRACT

A method and apparatus for managing power of a storage system are provided. The method comprises obtaining historical access information of a plurality of storage devices in the storage system within a time cycle, determining, according to the historical access information, a cold time period in the time cycle, forming a cold storage device for storing at least a part of cold data blocks within the cold time period, and setting power of the cold storage device to a low power mode in a time period of a subsequent time cycle corresponding to the cold time period. The apparatus is configured to implement the method. The method and apparatus effectively save power consumption of the storage system.

CROSS REFERENCE TO RELATED APPLICATION

This application claims the benefit of priority from Chinese PatentApplication No. 201310450272.7 filed on Sep. 27, 2013, the entirety ofwhich is incorporated by reference.

FIELD OF THE INVENTION

The present invention relates to a storage system and power supplythereof, and more specifically, to a method and apparatus for managingpower of the storage system.

BACKGROUND

With the development of information technology, the amount of data thatneeds to be stored and processed increases dramatically. Therefore,besides improving the storage density and storage capacity of a singlestorage device, there is also proposed a storage system comprising aplurality of storage devices used to store data. For example, a storagearray comprising a plurality of independent non-volatile storage (e.g.,disk, solid state drive, etc.) may be used as the storage system, and anarray set comprising a plurality of storage arrays may also act as thestorage system. Due to the rapid increase in data storage needs, storagesystems are loaded with more and more storage devices. For a storagesystem comprising a large number of storage devices, how to improve itsoperating performance attracts a lot of attention. Generally, in thestorage system mentioned above, data is distributed on the respectivestorage devices. To improve the performance, some storage systemsdetermine “hot” storage units or data blocks on the storage devices anddistribute these hot data blocks evenly on different storage devices soas to avoid performance bottlenecks caused by some storage devices.Other storage systems migrate hot data blocks accessed more frequentlyto high-performance storage medium layers and migrate non-hot datablocks accessed less frequently to a relatively low-performance storagemedium layers so as to better utilize storage performance of differentmedia and implement high-performance storage. The evaluation on a hotdata block may be based on response time of a storage unit correspondingto the data block or inputs/outputs per second (IOPS).

However, compared with the operating performance, energy consumption ofthe storage systems gets less consideration in previous disclosures. Theenergy consumption is becoming a prominent problem for storage systemsloaded with a large number of storage devices. According to an existingsolution, a timer is set for a storage device, which timer starts timingwhen the storage device enters an idle state after the completion ofdata access. When the timer reaches certain timing value, the storagedevice will be set to a low power state. In other words, when thestorage device has no data access within a certain time period, it willbe set to the low power state. However, for a storage system comprisinga plurality of storage devices, such solution may cause respectivestorage devices to frequently switch between different power states,thus affecting performance of the storage devices.

SUMMARY

Embodiments of the present invention provide a method for managing powerof a storage system, the storage system comprising a plurality ofstorage devices, each storage device comprising a plurality of storageunits, each storage unit usable for storing a data block. The methodcomprises obtaining historical access information of the plurality ofstorage devices; the historical access information records status ofaccesses to data blocks in respective ones of the storage units on theplurality of storage devices within a time cycle. The method furthercomprises determining a cold time period in the time cycle, according tothe historical access information; within the cold time period, a numberof cold data blocks satisfies a predetermined condition. A number ofaccesses to each of the cold data blocks is less than an accessthreshold. The method further comprises forming, on the plurality ofstorage devices, at least one cold storage device for storing at least apart of the cold data blocks within the cold time period. The methodfurther comprises setting power of the at least one cold storage deviceto a low power mode, in a time period of a subsequent time cyclecorresponding to the cold time period.

Embodiments of the present invention provide an apparatus for managingpower of a storage system, the storage system comprising a plurality ofstorage devices, each storage device comprising a plurality of storageunits, each storage unit for storing a data block. The apparatuscomprises a historical information obtaining unit configured to obtainhistorical access information of the plurality of storage devices. Thehistorical access information records status of accesses to data blocksin respective ones of the storage units on the plurality of storagedevices within a time cycle. The apparatus further comprises a cold timeperiod determination unit configured to determine, according to thehistorical access information, a cold time period in the time cycle.Within the cold time period, a number of cold data blocks satisfies apredetermined condition, and a number of accesses to each of the colddata blocks is less than an access threshold. The apparatus furthercomprises a cold storage device forming unit configured to form, on theplurality of storage devices, at least one cold storage device forstoring at least a part of the cold data blocks within the cold timeperiod. The apparatus further comprises a power setting unit configuredto set power of the at least one cold storage device to a low powermode, in a time period of a subsequent time cycle corresponding to thecold time period.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a diagram illustrating an exemplary computer system/serverwhich is applicable to implement an embodiment of the present invention,in accordance with one embodiment of the present invention.

FIG. 2 is a flowchart of a power management method for a storage system,in accordance with one embodiment of the present invention.

FIG. 3 is a schematic structural diagram of a RAID array of a storagedevice, in accordance with one embodiment of the present invention.

FIG. 4 is a diagram illustrating historical access information obtained,in accordance with one embodiment of the present invention.

FIG. 5 is a flowchart of forming cold storage devices, in accordancewith one embodiment of the present invention.

FIG. 6 is a block diagram of a management apparatus, in accordance withone embodiment of the present invention.

DETAILED DESCRIPTION

Some embodiments are described in more detail with reference to theaccompanying drawings, in which the embodiments of the presentdisclosure have been illustrated. However, the present disclosure can beimplemented in various ways and thus should not be construed to belimited to the embodiments disclosed herein. The embodiments areprovided for thorough and complete understanding of the presentdisclosure by those skilled in the art.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.), or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module”, or “system”.Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may be used.The computer readable medium may be a computer readable storage medium.A computer readable storage medium may be, for example, but not limitedto, an electronic, magnetic, optical, electromagnetic, infrared, orsemiconductor system, apparatus, or device, or any suitable combinationof the foregoing. More specific examples (a non-exhaustive list) of thecomputer readable storage medium would include the following: anelectrical connection having one or more wires, a portable computerdiskette, a hard disk, a random access storage (RAM), a read-onlystorage (ROM), an erasable programmable read-only storage (EPROM orflash storage), an optical fiber, a portable compact disc read-onlystorage (CD-ROM), an optical storage device, a magnetic storage device,or any suitable combination of the foregoing. In the context of thisdocument, a computer readable storage medium may be any tangible mediumthat can contain, or store a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programminglanguage, such as Java, Smalltalk, C++, or the like, and conventionalprocedural programming languages, such as the “C” programming languageor similar programming languages. The program code may execute entirelyon the user's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer, or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN), awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products, according to embodiments ofthe invention. It will be understood that each block and combinations ofblocks in the flowchart illustrations and/or block diagrams can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine. The instructions, whichexecute via the processor of the computer or other programmable dataprocessing apparatus, create means for implementing the functions/actsspecified in the flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored on a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particular way,so that the instructions stored on the computer readable medium producean article of manufacture which includes instructions implementing thefunction/act specified in the flowchart and/or block diagram block orblocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be executed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process so that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

FIG. 1 is a diagram illustrating exemplary computer system/server 12which is applicable to implement an embodiment of the present invention,in accordance with one embodiment of the present invention. Computersystem/server 12 is only illustrative and is not intended to suggest anylimitation as to the scope of use or functionality of embodiments of theinvention described herein.

Referring to FIG. 1, computer system/server 12 is shown in the form of ageneral-purpose computing device. The components of computersystem/server 12 includes, but are not limited to, one or moreprocessors or processing units 16, memory 28, and bus 18 that couplesvarious system components including memory 28 to processing unit 16.

Bus 18 represents one or more of any of several types of bus structures,including a storage bus or storage controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example but not limitation, sucharchitectures include Industry Standard Architecture (ISA) bus, MicroChannel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnect (PCI) bus.

Computer system/server 12 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 12 and includes both volatile andnon-volatile media, removable and non-removable media.

Memory 28 includes computer system readable media in the form ofvolatile storage, such as random access storage (RAM) 30 and/or cachestorage 32. Computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 is provided for readingfrom and writing to a non-removable, non-volatile magnetic media (notshown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM, or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. As will be further depicted and described below,memory 28 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 40, including a set (e.g., at least one) of programmodules 42, may be stored in memory 28 by way of example and notlimitation. Program/utility 40 may further include an operating system,one or more application programs, other program modules, and programdata. The operating system, one or more application programs, otherprogram modules, program data, or some combination thereof may includean implementation of a networking environment. Program modules 42generally carry out the functions and/or methodologies of embodiments ofthe invention as described herein.

Computer system/server 12 communicates with one or more externaldevice(s) 14, such as a keyboard, a pointing device, a display 24, etc.Computer system/server 12 may communicate with one or more devices thatenable a user to interact with computer system/server 12. Computersystem/server 12 may further communicate with any devices (e.g., networkcard, modem, etc.) that enable computer system/server 12 to communicatewith one or more other computing devices. Such communications can occurvia Input/Output (I/O) interface(s) 22. Furthermore, computersystem/server 12 can communicate, via network adapter 20, with one ormore networks such as a local area network (LAN), a general wide areanetwork (WAN), and/or a public network (e.g., the Internet). Asdepicted, network adapter 20 communicates with the other components ofcomputer system/server 12 via bus 18. It should be understood thatalthough not shown, other hardware and/or software components can beused in conjunction with computer system/server 12. Examples of theother hardware and/or software components include, but are not limitedto, microcode, device drivers, redundant processing units, external diskdrive arrays, RAID (redundant array of inexpensive disks) systems, tapedrives, and data archival storage systems, etc.

Respective embodiments of the present invention are described below inconjunction with the accompanying drawings. In a plurality ofembodiments of the invention, a cold time period with fewer accesses aswell as cold data blocks less frequently accessed in the cold timeperiod are determined according to historical access information of thestorage system within a time cycle. The information about the cold timeperiod and cold data blocks obtained may be used for predicting dataaccess in a next time cycle. In order to enable the storage system toreduce power consumption accordingly, in case of fewer accesses, datablock migration is executed based on the obtained information of thecold data blocks so as to gather cold data blocks to selected storagedevices to form cold storage devices. Thus, in the next cold timeperiod, the cold storage devices may be set in a low power mode, therebyreducing power consumption of the storage system. The mode for carryingout the concept of the present invention is described below withreference to the accompanying drawings and examples.

FIG. 2 is a flowchart of a power management method for a storage system,in accordance with one embodiment of the present invention. In theembodiment, the power management method comprises the following steps.At step 210, historical information obtaining unit 610 of managementapparatus 600 (shown in FIG. 6) obtains historical access information ofa plurality of storage devices included in the storage system.Historical access information records status of accesses to data blocksin respective storage units in the plurality of storage devices within atime cycle. At step 220, cold time period determination unit 620 ofmanagement apparatus 600 (shown in FIG. 6) determines, according to thehistorical access information, a cold time period in the time cycle.Within the time cycle, the number of cold data blocks satisfies apredetermined condition. The cold data blocks are data blocks eachhaving the number of being accessed smaller than an access threshold. Atstep 230, cold storage device forming unit 630 of management apparatus600 (shown in FIG. 6) forms, in the plurality of storage devices, atleast one cold storage device for storing at least a part of the colddata blocks of the cold time period. At step 240, power setting unit 640of management apparatus 600 (shown in FIG. 6) sets power of the at leastone cold storage device to a low power mode in a time period of asubsequent time cycle corresponding to the cold time period. Theexecution of the steps will be described below in conjunction withspecific examples.

First, at step 210, historical access information of the storage systemis obtained. The storage system includes a plurality of storage devices,each storage device includes a plurality of storage units, and eachstorage unit is used for storing a data block. As described above, thestorage system may be embodied in many forms. In one embodiment, thestorage system is a storage array comprising a plurality of non-volatilestorage (e.g., disk, solid-state drive) independently reading andwriting data as storage devices. Accordingly, the unit for data readingand writing in a non-volatile storage can be regarded as a storage unitthereof. In another embodiment, the storage system is an array setcomprising a plurality of storage arrays. More specifically, the storagearray may be, for example, a RAID (Redundant Arrays of IndependentDisks) array. As to the RAID array, the commonly used array formincludes RAIDS array that can tolerate one disk failure and RAID6 arraythat can simultaneously tolerate two disk failures. On a RAID array,typically, data is striped and distributed to different disks. FIG. 3shows a schematic structural diagram of a RAID array. As shown in FIG.3, the RAID array comprises a plurality of storage disks; in the exampleof FIG. 3, there are six disks on the array. The plurality of disks aredivided into a plurality of stripes horizontally, such that each stripecontains storage chunks from the plurality of disks respectively.Accordingly, the reading and writing of data are operated on a pluralityof storage chunks in a same stripe, i.e., the data reading and writingare operated in the unit of stripe which involves the plurality of diskson the array. Therefore, in the case of taking an array set comprising aplurality of RAID arrays as a storage system, each RAID array acts as astorage device described above, and a stripe on the array act as astorage unit. The data blocks formed based on the strips are also knownas extents.

Although typical storage systems are described above by way of examples,it may be appreciated that the storage system may also have other ormore forms and compositions, as long as it includes a plurality ofstorage devices and the plurality of storage devices can store data andmanage power independently from each other.

For a storage system as described above, at step 210, historical accessinformation of the plurality of storage devices included in the storagesystem is obtained. The historical access information records status ofaccesses to data blocks in respective storage units on the plurality ofstorage devices within a time cycle. In one embodiment, in order toobtain the historical access information, the time cycle may be dividedinto a plurality of time periods. Status of accesses to data blocks inrespective storage units is recorded directed to respective timeperiods. The status, for example, is as follows: whether a data block isaccessed, the number of accesses, type of access, and so on. The lengthsof the time cycle and time periods may be set according to needs. In oneexample, the time cycle is set as 24 hours and is further divided into24 time periods, i.e., each time period corresponds to one hour. This isparticularly applicable to storage system that takes one day as a workcycle. In other examples, the time cycle may also be set as differentlengths of time according to needs; for example, 8 hours, 3 days, oneweek, etc. and then the time cycle is divided into a plurality of timeperiods correspondingly. In one embodiment, when a data block isaccessed for the first time in a certain time period, besides performingnormal IO read/write operations, the process of recording status ofaccesses may comprise marking the data block as an accessed data block.In another embodiment, counters are set for respective data blocks.Within a certain time period, once a data block is accessed, the countvalue of a corresponding counter is incremented; when the time enters anew time period, all the counters are reset. Thereby, the number ofaccesses to respective data blocks on respective storage devices in eachtime period may be recorded as access information through the countvalues of the counters.

FIG. 4 is a diagram illustrating historical access information obtained,in accordance with one embodiment of the present invention. In FIG. 4,respective time periods in a time cycle are shown in rows. As shown inFIG. 4, 24 hours are taken as one time cycle, which is divided into 24time periods. In addition, data blocks in respective storage units ofrespective storage devices are shown in columns in FIG. 4; for example,(Ri, Ej) represents a data block corresponding to the j-th storage unitof the i-th storage device, or called as the j-th data block on the i-thstorage device. According to the embodiment of FIG. 4, in each timeperiod, the status of accesses to the respective data blocks ismonitored, and thus the status is recorded and marked. Specifically, inthe example of FIG. 4, “1” represents data blocks accessed in thecorresponding time period, and “0” represents data blocks not accessed,thereby forming the historical access information shown in FIG. 4. Withthis historical access information, status of accesses to the datablocks on the respective storage devices in different time periods isobtained. For example, the first data block (R1, E1) on the firststorage device is not accessed at the time period 0 (corresponding tothe time period 0:00-1:00) and is accessed in the time period 1(corresponding to the time period 1:00-2:00), while the last data block(R1, En) on the first storage device is accessed in time period 0 andnot accessed in time period 1.

The historical access information of FIG. 4 uses “0” and “1” to markdata blocks not accessed and data blocks accessed, respectively. Inother embodiments, the number of accesses to data blocks in a specifictime period may also be shown directly in the historical accessinformation. A data block having the number of being accessed smallerthan an access threshold in a certain time period may be called as acold data block of the time period, while a data block having the numberof being accessed equal to or larger than the access threshold in thetime period is called as a hot data block. In a typical case, the accessthreshold may be set to 1. In this case, a cold data block refers to adata block not accessed in the corresponding time period, and a hot datablock refers to a data block accessed. In other examples, the accessthreshold may also be set to other small values according to needs.

It may be appreciated that the historical access information may record,in a plurality of forms, status of accesses to data blocks on respectivestorage devices in a predetermined time cycle. In the case that the timecycle corresponds to the work cycle of the storage system, thehistorical access information thus obtained often exhibits regularityrelated with the number of accesses. For example, an online sales siteusually receives and processes a large number of browsing requests andorders in specific certain periods during the day but almost has noviewing and orders in some time periods at night. Accordingly, thenumber of accesses of the storage system for the online sales sitereaches a lowest point at night. In the case of recording historicalaccess information using 24 hours as the time cycle as shown in FIG. 4,there may exist some time periods with few accesses in which there aremany cold data blocks and few hot data blocks. Thus, a cold time periodwith few accesses may be determined based on the number of cold datablocks. Such cold time period may be used as a time period forperforming the power saving solution.

Specifically, at step 220, according to the obtained historical accessinformation, a cold time period in the time cycle is determined. In thecold time period, the number of cold data blocks satisfies apredetermined condition. According to the need, the predeterminedcondition may be set in advance.

In one embodiment, the predetermined condition is that the total numberof cold data blocks in the storage system is larger than or equal to thenumber of storage units included on at least one storage device. Morespecifically, in one example, the plurality of storage devices includedin the storage system have the same capacity, i.e., the same number ofstorage units; thus, the predetermined condition above may be set simplyto that the total number of cold data blocks is larger than or equal tothe number of storage units on each storage device. In another example,the plurality of storage devices included in the storage system havedifferent numbers of storage units; thus, the predetermined conditionmay be set to that the total number of cold data blocks is larger thanor equal to the number of storage units included on the storage devicewith the smallest capacity. In some embodiments, the standard fordetermining the cold time period may be set more strictly; for example,the predetermined condition can be set as that the total number of colddata blocks is larger than the total number of storage units included ontwo or more storage devices.

It may be appreciated that, although examples of the predeterminedcondition for determining cold time periods are described abovespecifically, embodiments of determining cold time periods are notlimited to those examples. Those skilled in the art may performcombinations, modifications, and substitutions based on the examplesdescribed specifically, and thus determine cold time period according toan appropriate standard based on practical needs.

On the basis of the cold time period determined, at step 230, at leastone cold storage device is formed for storing cold data blocks of thecold time period. In other words, at least a part of the cold datablocks of the cold time period is stored onto at least one cold storagedevice, such that the at least one cold storage device does not includeany hot data block of the cold time period.

FIG. 5 is a flowchart of forming a cold storage, in accordance with oneembodiment of the present invention. The flowchart shown in FIG. 5 aresub-steps of step 230 shown in FIG. 2. As shown in FIG. 5, at step 531,cold storage device forming unit 630 (shown in FIG. 6) determines atarget storage device. At decision block 532, cold storage deviceforming unit 630 determines whether the target storage device stores hotdata blocks of the cold time period. In response to determining that thetarget storage device stores hot data blocks of the cold time period(YES branch of decision block 532), at step 533, cold storage deviceforming unit 630 migrates the hot data blocks on the target storagedevice onto other storage devices. At step 534, cold storage deviceforming unit 630 determines the target storage device as a cold storagedevice. In response to determining that the target storage device doesnot store hot data blocks of the cold time period (NO branch of decisionblock 532), cold storage device forming unit 630 directly proceeds tostep 534 to determine the target storage device as the cold storagedevice. The execution of the above steps is described below inconjunction with specific examples.

In one embodiment, the step of determining the target storage deviceincludes the following processes: (1) determining at least one candidatetarget storage device, the number of storage units of which is largerthan or equal to the total number of cold data blocks of the storagesystem in the cold time period and (2) selecting one or more devicesfrom the at least one candidate target storage device as the targetstorage device. The predetermined condition for determining the coldtime period is that the total number of cold data blocks is larger thanor equal to the number of storage units included on at least one storagedevice; therefore, in such cold time period there certainly exists atleast one storage device, the number of storage units of which issmaller than or equal to the total number of cold data blocks. Such atleast one storage device can be considered as candidate target storagedevices.

If there exists only one candidate target storage device, this candidatestorage device can then be determined as the target storage device. Ifthere exist a plurality of candidate target storage devices, then one ormore of them can be selected as the target storage device. In oneembodiment, one or more devices are randomly selected from the pluralityof candidate target storage devices as the target storage device. Inanother embodiment, a storage device containing a maximum number of colddata blocks is selected from the plurality of candidate target storagedevices as the target storage device.

In one embodiment, free blocks included on the storage devices arefurther considered. In such a case, a storage device, the number ofstorage units of which is smaller than or equal to the total number ofcold data blocks of the cold time period plus the total number of freeblocks, may be determined as the candidate target storage device. Insuch a manner it is possible to obtain more candidate target storagedevices. When selecting the target storage device from the candidatetarget storage devices, a storage device with a maximum summation of thenumber of cold data blocks and the number of free blocks may be selectedas the target storage device. Alternatively, a storage device includingthe least hot data blocks may be selected as the target storage device.

For the target storage device, at decision block 532, whether there is ahot data block stored on the target storage device is determined. Ifthere is no hot data block stored on the target storage device, suchtarget storage device may then be directly used as the cold storagedevice. However, if there is a hot data block on the target storagedevice, it is then needed to perform data block migration at step 533,thereby excluding the hot data block from the target storage device andmaking it store only the cold data blocks.

In one embodiment, free space of other storage devices than the targetstorage device in the storage system is sufficient to accommodate thehot data blocks on the target storage device. In this case, at step 533,it only needs to migrate the hot data blocks on the target storagedevice onto the free space of the other storage devices without makingany data blocks moved into the target storage device. Accordingly, thestorage units that originally store the hot data blocks on the targetstorage device become free block. However, in another embodiment, freespace on the other storage devices may be not enough to store all hotdata blocks on the target storage device. In this case, at step 533, inaddition to moving the hot data blocks on the target storage device out,it is further required to move in cold data blocks from other storagedevices, the number of which is equal to or smaller than the number ofthe hot data blocks. A part of the hot data blocks on the target storagedevice are exchanged with cold data blocks on other storage devices, soas to achieve the purpose of excluding the hot data blocks from thetarget storage device. Of course, it may be appreciated that in the casewhere free space is enough to accommodate the hot data blocks on thetarget storage device, it is also applicable to selectively make a partor all of the hot data blocks migrated and exchanged with the cold datablocks on other storage devices.

Through step 533, the hot data blocks on the target storage device aremoved out, and the target storage device is merely used for storing thecold data blocks. Thus, the target storage device that is only used forstoring cold data blocks after the data block migration may bedetermined as the cold storage device.

A plurality of cold storage devices may be formed as described above.However, when a subsequent cold storage device is formed, it is requiredto “seal off” the cold storage devices previously formed; in otherwords, when it is required to consider the numbers and distribution ofthe cold data blocks and free blocks in the process of forming asubsequent cold storage device, cold data blocks and free blocks in thecode storage devices already formed are excluded. For example, when itis to determine a subsequent target storage device, only remaining colddata blocks and remaining free blocks in the storage system areconsidered, wherein the remaining cold data blocks are cold data blockson storage devices other than the formed cold storage devices in thestorage system, and the remaining free blocks are free blocks on storagedevices other than the formed cold storage devices in the storagesystem. In the case where the target storage device cannot bedetermined, the process of forming the cold storage device is ended.

In one embodiment, a plurality of consecutive cold time periods aredetermined at step 220. In order to avoid reforming the cold storagedevice in consecutive cold time periods, at step 230, data blocks alwaysas cold data blocks in consecutive cold time periods, called common colddata blocks hereinafter, are stored to the same cold storage device sothat a part of the formed cold storage device are applicable forconsecutive cold time periods. To this end, in one embodiment, todetermine the target storage device, storage device in which more commoncold data blocks are stored is preferably selected. In one embodiment,in the process of migrating data blocks, the common cold data blocks aremigrated to the same target storage device. Furthermore, those skilledin the art may further consider the numbers and distributions ofrespective cold data blocks of respective cold time periods in theconsecutive cold time periods to optimize the process of forming thecold storage devices.

It may be appreciated that, in the above process of forming the coldstorage devices, it is usually required to conduct the migration of datablocks. Since there have been proposed a plurality of methods formigrating data blocks between different storage devices, those skilledin the art can select an appropriate way to execute the migration ofdata blocks so as to store the cold data blocks to the cold storagedevices.

Since each of the cold storage devices formed above stores only the colddata blocks of the cold time period, it is reasonable to predict thatduring the next cold time period there is low probability that the coldstorage device would be accessed. Therefore, at step 240 shown in FIG.2, in a time period of a subsequent time cycle corresponding to theprevious cold time period, power of the formed cold storage devices isset to the low power mode.

There are many power management ways for storage devices. For example,parameter settings or commands for the power management of single diskstorage are defined in SCSI Primary Commands-4 (SPC-4) and SCSI BlockCommands-3 (SBC-3), including command START STOP UNIT. With thiscommand, power consumption of the disk can be set into different levels.These levels include, for example, from high power to low powerconsumption, active, idle_a, idle_b, idle_c, standby_y, and standby_z.Different disk vendors may implement the different power consumptionlevels by various ways, such as changing the rotating speed, etc. Withthe above commands and manners, power of the cold storage devices formedat step 230 can be set to a low power mode, e.g., standby_z. In a casewhere a storage device corresponds to a RAID array, setting the coldstorage devices to a low power mode requires all the storage (e.g.,disks) forming the RAID arrays of the cold storage devices to be set toa low power mode. In addition, based on various power settings manners,those skilled in the art also may use other commands and ways to achievepower saving setting of the cold storage devices.

Once set to a low power mode, the cold storage devices enter into a lowpower “sleep” state. Correspondingly, it is required to “wake-up” thesleeping cold storage devices in appropriate timing so that they mayreturn to a normal work state. Thus, in one embodiment, the method ofmanaging power of the storage system further comprises setting at leastone of the cold storage devices back to a normal work state from the lowpower mode in response to a wake-up condition. In the embodiment, theabove-mentioned wake-up condition is the end of the time period in thecurrent time cycle corresponding to the cold time period. At this time,the cold storage devices are woken up and then return to the normal workstate. In another embodiment, the above-mentioned wake-up condition isaccess to a data block on a cold storage device. In response to suchaccess, the cold storage device is woken up to the normal work state. Inthis case, if the access occurs within the cold time period, then thecold storage device ends the sleep state in advance of the cold timeperiod; if the access occurs after the end of the cold time period, thesleep time of the cold storage device is longer than the cold timeperiod. In yet another embodiment, the wake-up condition can be acombination of the wake-up conditions of the above two embodiments.Specifically, if the data block access occurs within the cold timeperiod, the cold storage device is woken up temporarily; if it is stillin the cold time period when the access is completed, then the coldstorage device is made to re-enter into a low power mode until the endof the cold time period. Alternatively, when the number of accesses tothe cold storage device within the cold time period reaches a pre-setnumber of wake-up threshold, the cold storage device is woken upcompletely so that it enters the normal work state. In a case where aplurality of cold storage devices are formed, the plurality of coldstorage devices may be woken up at different times, respectively. In yetanother embodiment, the types of access to the data blocks are furtherconsidered. Specifically, the above wake-up condition is set to a readaccess to a data block on a cold storage device. In response to the readaccess, the cold storage device is set back to the normal work statefrom the low power mode. However, if a write access is conducted to aspecific data block on a cold storage device, the cold storage device isnot waken up immediately; instead, new data is written to free space onanother storage device of the storage system, and an association betweenthe logical address of the new data and the physical address of the newdata block is set up and recorded. After the cold storage device iswoken up for other reasons, original data in the above specific datablock on the cold storage device is deleted based on an associationbetween the logical address of the data block and the physical addressof the old data block and thus ensure data integrity. Therefore, theprobability of the cold storage device being woken up is furtherdecreased, and thus the sleep time thereof is extended, therebyachieving the purpose of power saving.

Based on the above method for managing power of the storage system, acold time period with fewer accesses may be determined according tohistorical access information, and cold data blocks in the cold timeperiod are stored onto the cold storage device. Thus, when the next coldtime period comes, power consumption of the storage system may be savedby setting power of the cold storage device to a low power mode.

The present invention further provides a management apparatus formanaging power of a storage system, wherein the storage system includesa plurality of storage devices, each storage device comprises aplurality of storage units, and each storage unit is usable for storinga data block. FIG. 6 is a block diagram of a management apparatus, inaccordance with one embodiment of the present invention. As shown inFIG. 6, the management apparatus for managing power of a storage systemis denoted by 600. Specifically, management apparatus 600 includeshistorical information obtaining unit 610 which is configured to obtainhistorical access information of the plurality of storage devices. Thehistorical access information records status of accesses to data blocksin respective storage units on the plurality of storage devices within atime cycle. Management apparatus 600 further includes cold time perioddetermination unit 620, which is configured to determine, according tothe historical access information, a cold time period in the time cycle.Within the cold time period, the number of cold data blocks satisfies apredetermined condition, and the cold data blocks are data blocks eachhaving the number of being accessed smaller than an access threshold.Management apparatus 600 further includes cold storage device formingunit 630, which is configured to form, on the plurality of storagedevices, at least one cold storage device for storing at least a part ofthe cold data blocks of the cold time period. Management apparatus 600further includes power setting unit 640, which is configured to setpower of the at least one cold storage device to a low power mode in atime period of a subsequent time cycle corresponding to the cold timeperiod.

According to one embodiment, the storage device is a RAID array, and thestorage unit corresponds to a stripe in the RAID array.

According to one embodiment, the predetermined condition is one of thefollowing: (1) total number of cold data blocks in the storage system islarger than or equal to the number of storage units included on at leastone storage device of the plurality of storage devices; or (2) asummation of total number of cold data blocks and total number of freeblocks in the storage system is larger than or equal to the number ofstorage units included on at least one storage device of the pluralityof storage devices.

In one embodiment, cold storage device forming unit 630 includes (notshown in FIG. 6): a target determination module configured to determinea target storage device; a migration module configured to migrate, in acase where there are hot data blocks of the cold time period stored onthe target storage device, the hot data blocks on the target storagedevice out to other storage devices; and a determination module todetermine the target storage device not including any hot data block asa cold storage device.

According to one embodiment, the migration module is further configuredto migrate cold data blocks from other storage devices to the targetstorage device, wherein the number of the cold data blocks is equal toor less than the number of the hot data blocks.

According to one embodiment, the target determination module isconfigured to determine at least one candidate target storage device.The at least one candidate target storage device satisfies one of thefollowing: (1) the number of storage units included therein is smallerthan or equal to total number of cold data blocks of the cold timeperiod in the storage system; (2) the number of storage units includedtherein is smaller than or equal to total number of the cold data blocksof the cold time period plus total number of free blocks in the storagesystem; (3) from the at least one candidate target storage device, thetarget storage device is selected.

In one embodiment, the target determination module is configured toexecute one of: (1) selecting from the at least one candidate targetstorage device a storage device that includes the maximum number of colddata blocks as the target storage device, and (2) selecting from the atleast one candidate target storage device a storage device that has themaximum summation of the number of cold data blocks and the number offree blocks as the target storage device.

In one embodiment, cold time period determination unit 620 is configuredto determine a plurality of consecutive cold time periods. The targetdetermination module is configured to determine a storage device as thetarget storage device that stores the maximum number of common cold datablocks in the plurality of consecutive cold time periods. The migrationmodule is configured to migrate common cold data blocks on other storagedevices to the target storage device.

According to one embodiment, management apparatus 600 further comprises:a wake up unit configured to set the cold storage device back to anormal work state from the low power mode, in response to a wake upcondition.

According to one embodiment, the wake up condition includes at least oneof: the end of the time period corresponding to the cold time period,and an access to a cold storage device.

It may be appreciated that respective units in FIG. 6 are divided byfunction, and thus the respective units may be located on the same ordifferent physical platforms.

With the method and management apparatus of the embodiments describedabove, a part of the storage devices in the storage system may be asleepin time periods with few accesses, thereby effectively reducing powerconsumption in the storage system.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A method for managing power of a storage system,the storage system comprising a plurality of storage devices, eachstorage device comprising a plurality of storage units, each storageunit for storing a data block, the method comprising: obtaininghistorical access information of the plurality of storage devices,wherein the historical access information records status of accesses todata blocks in respective ones of the storage units on the plurality ofstorage devices within a time cycle; determining according to thehistorical access information, a cold time period in the time cycle,within which a number of cold data blocks satisfies a predeterminedcondition, wherein a number of accesses to each of the cold data blocksis less than an access threshold; determining, on the plurality ofstorage devices, a target storage device for forming at least one coldstorage device for storing at least a part of the cold data blockswithin the cold time period; determining whether the target storagedevice includes at least one hot data block; migrating the at least onehot data block on the target storage device onto other storage devices,in response to determining that the target storage device includes atleast one hot data block, wherein a number of accesses to the at leastone hot data block is larger than or equal to the access threshold;migrating the cold data blocks from the other storage devices to thetarget storage device, in response to determining that the number of thecold data blocks on the other storage devices is equal to or less than anumber of the hot data blocks on the target storage device; and settingpower of the at least one cold storage device to a low power mode, in atime period of a subsequent time cycle corresponding to the cold timeperiod.
 2. The method of claim 1, wherein the predetermined condition isone of: the number of the cold data blocks in the storage system beinglarger than or equal to a number of the storage units included on atleast one of the plurality of storage devices; and a summation of thenumber of cold data blocks and a number of free blocks in the storagesystem being larger than or equal to the number of the storage unitsincluded on the at least one of the plurality of storage devices.
 3. Themethod of claim 1, further comprises: determining the target storagedevice as the at least one cold storage device, in response todetermining that the target storage device does not include any hot datablock.
 4. The method of claim 1, wherein the step of determining thetarget storage device comprises: determining at least one candidatetarget storage device, wherein the at least one candidate target storagedevice satisfies one of: the number of the storage units includedthereon being smaller than or equal to the number of the cold datablocks during the cold time period in the storage system, and the numberof the storage units included thereon being smaller than or equal to thenumber of the cold data blocks during the cold time period plus a numberof free blocks in the storage system; and selecting the target storagedevice from the at least one candidate target storage device.
 5. Themethod of claim 4, wherein the step of selecting the target storagedevice comprises one of: selecting, from the at least one candidatetarget storage device, a storage device that includes a maximum numberof the cold data blocks as the target storage device; and selecting,from the at least one candidate target storage device, a storage devicethat has a maximum summation of the number of the cold data blocks andthe number of the free blocks as the target storage device.
 6. Themethod of claim 1, further comprising: determining a plurality ofconsecutive cold time periods; determining a storage device that storesa maximum number of common cold data blocks in the plurality ofconsecutive cold time periods as the target storage device; andmigrating the common cold data blocks on the other storage devices tothe target storage device.
 7. The method of claim 1, further comprising:setting the at least one cold storage device from the low power mode toa normal work state, in response to a wake-up condition.
 8. The methodof claim 7, wherein the wake-up condition comprises at least one of: anend of a time period corresponding to the cold time period, and anaccess to a cold storage device.
 9. An apparatus for managing power of astorage system, the storage system comprising a plurality of storagedevices, each storage device comprising a plurality of storage units,each storage unit for storing a data block, the apparatus comprising: ahistorical information obtaining unit configured to obtain historicalaccess information of the plurality of storage devices, wherein thehistorical access information records status of accesses to data blocksin respective ones of the storage units on the plurality of storagedevices within a time cycle; a cold time period determination unitconfigured to determine, according to the historical access information,a cold time period in the time cycle, within which a number of cold datablocks satisfies a predetermined condition, wherein a number of accessesto each of the cold data blocks is less than an access threshold; a coldstorage device forming unit configured to determine, on the plurality ofstorage devices, a target storage device for forming at least one coldstorage device for storing at least a part of the cold data blockswithin the cold time period; the cold storage device forming unitconfigured to determine whether the target storage device includes atleast one hot data block; the cold storage device forming unitconfigured to migrate the at least one hot data block on the targetstorage device onto other storage devices, in response to determiningthat the target storage device includes the at least one hot data block,wherein a number of accesses to the at least one hot data block islarger than or equal to the access threshold; the cold storage deviceforming unit configured to migrate the cold data blocks from the otherstorage devices to the target storage device, in response to determiningthat the number of the cold data blocks on the other storage devices isequal to or less than a number of the hot data blocks on the targetstorage device; and a power setting unit configured to set power of theat least one cold storage device to a low power mode, in a time periodof a subsequent time cycle corresponding to the cold time period. 10.The apparatus of claim 9, wherein the predetermined condition is one of:the number of the cold data blocks in the storage system being largerthan or equal to a number of the storage units included on at least oneof the plurality of storage devices; and a summation of the number ofcold data blocks and a number of free blocks in the storage system beinglarger than or equal to the number of the storage units included on theat least one of the plurality of storage devices.
 11. The apparatus ofclaim 9, the cold storage device forming unit further configured todetermine the target storage device as the at least one cold storagedevice, in response to determining that the target storage device doesnot include any hot data block.
 12. The apparatus of claim 9, the coldstorage device forming unit further configured to: determine at leastone candidate target storage device, wherein the at least one candidatetarget storage device satisfies one of: the number of the storage unitsincluded thereon being smaller than or equal to the number of the colddata blocks during the cold time period in the storage system, and thenumber of the storage units included thereon being smaller than or equalto the number of the cold data blocks during the cold time period plus anumber of free blocks in the storage system; and select the targetstorage device from the at least one candidate target storage device.13. The apparatus of claim 9, the cold storage device forming unitfurther configured to execute one of: selecting, from the at least onecandidate target storage device, a storage device that includes amaximum number of the cold data blocks as the target storage device; andselecting, from the at least one candidate target storage device, astorage device that has a maximum summation of the number of the colddata blocks and the number of the free blocks as the target storagedevice.
 14. The apparatus of claim 9, the cold storage device formingunit further configured to determine a storage device that stores amaximum number of common cold data blocks in a plurality of consecutivecold time periods as a target storage device, and wherein the migrationmodule is further configured to migrate the common cold data blocks onthe other storage devices to the target storage device.
 15. Theapparatus of claim 9, wherein the cold time period determination unit isfurther configured to determine a plurality of consecutive cold timeperiods.
 16. The apparatus of claim 9, further comprising a wake-up unitconfigured to set the at least one cold storage device from the lowpower mode to a normal work state, in response to a wake-up condition.17. The apparatus of claim 16, wherein the wake-up condition comprisesat least one of: an end of a time period corresponding to the cold timeperiod, and an access to a cold storage device.